package public

import (
	"context"
	"git.900sui.cn/kc/rpcinterface/client"
	"git.900sui.cn/kc/rpcinterface/interface/public"
)

type Jpush struct {
	client.Baseclient
}

func (j *Jpush) Init() *Jpush {
	j.ServiceName = "rpc_public"
	j.ServicePath = "Jpush"
	return j
}

//用户绑定极光id
func (j *Jpush) BindJpushRegid(ctx context.Context, args *public.ArgsBindJpushRegid, reply *bool) error {
	return j.Call(ctx, "BindJpushRegid", args, reply)
}

//解绑
func (j *Jpush) UnbindJpushRegid(ctx context.Context, args *public.ArgsBindJpushRegid, reply *bool) error {
	return j.Call(ctx, "UnbindJpushRegid", args, reply)
}

//添加推送消息任务
func (j *Jpush) PushMsgTask(ctx context.Context, args *public.ArgsPushMsgTask, pushMsgId *int) error {
	return j.Call(ctx, "PushMsgTask", args, pushMsgId)
}

//执行推送消息任务
func (j *Jpush) RunPushMsg(ctx context.Context, pushMsgId *int, reply *bool) error {
	return j.Call(ctx, "RunPushMsg", pushMsgId, reply)
}
